﻿namespace StarsAdmin.Core.DB.Entities
{
    /// <summary>
    /// 角色实体
    /// </summary>
    public class RoleEntity : BaseEntity
    {
        /// <summary>
        /// 角色名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 角色标识
        /// </summary>
        public string Identifying { get; set; }

        /// <summary>
        /// 角色描述
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsEnabled { get; set; } = true;

        public long[]? MenuIds { get; set; }
        public virtual ICollection<MenuEntity> Menus { get; set; } = new List<MenuEntity>();
        public long[]? UserIds { get; set; }
        public virtual ICollection<UserEntity> Users { get; set; } = new List<UserEntity>();
    }
}